package com.pkx.cloud.fse7.dms.staff.feign;

import com.pkx.cloud.fse7.dms.staff.entity.Staff;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "StaffService", url = "${pkx.base-url}/api/")
public interface StaffFeign {

    /**
     * 人事新增/修改接口
     *
     * @param staff
     * @return
     */
    @PostMapping("StaffService/EditStaff")
    String EditStaff(@RequestBody Staff staff);

    /**
     * 人事删除接口
     *
     * @param str
     * @return
     */
    @PostMapping(value = "/Staff/DeleteFunc", consumes = {MediaType.APPLICATION_JSON_VALUE})
    String DeleteFunc(@RequestBody String str);

    /**
     * 人员详细信息
     *
     * @param id
     * @return
     */
    @GetMapping("Staff/Get/{id}")
    String get(@PathVariable("id") Integer id);

}
